<template>
  <div class="config-param pdb50">
    <!-- 可见级别 -->
    <div class="attr-item-edit-wrapper">
      <p class="attr-item-title pdt10">可见级别</p>
      <div class="col-1 attr-item-edit-input">
        <el-slider
          show-input
          :min="3"
          :max="18"
          input-size="mini"
          :step="1"
        ></el-slider>
        <div class="attr-item-edit-input-des">默认范围（3-18）</div>
      </div>
    </div>
    <!-- 高德底图key -->
    <div class="attr-item-edit-wrapper">
      <p class="attr-item-title">高德底图key</p>
      <div class="col-1 attr-item-edit-input">
        <el-input size="mini"></el-input>
      </div>
    </div>
    <!-- 地图样式选择 -->
    <div class="attr-item-edit-wrapper">
      <p class="attr-item-title">地图样式选择</p>
      <div class="col-1 attr-item-edit-input">
        <span class="bgStyle" :style="{display: 'inline-block',width: '20px', height: '20px', verticalAlign: 'middle', background: selectColor}"></span>
        <el-select
          class="selec-mtap-style"
          :style="{width:' 100%'}"
          placeholder="请选择"
          size="mini"
          v-model="num"
          @change="selectMapStyle"
        >
          <el-option
            v-for="item in bgOptions"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          >
           <span :style="{display: 'inline-block',width: '20px', height: '20px', verticalAlign: 'middle', background: item.bgColor}"></span>
           <span style="vertical-align: middle;margin-left: 10px;">{{ item.label }}</span>
          </el-option>
        </el-select>
      </div>
    </div>
    <!-- 显示内容 -->
    <div class="attr-item-edit-wrapper">
      <p class="attr-item-title">显示内容</p>
      <div class="col-1 attr-item-edit-input">
        <el-checkbox-group v-model="checkList" class="check-box-style">
          <el-checkbox label="背景">背景</el-checkbox>
          <el-checkbox label="道路">道路</el-checkbox>
          <el-checkbox label="建筑物">建筑物</el-checkbox>
          <el-checkbox label="标注">标注</el-checkbox>
          <el-checkbox label="路况">路况</el-checkbox>
        </el-checkbox-group>
      </div>
    </div>
    <!-- 亮度 -->
    <div class="attr-item-edit-wrapper">
      <p class="attr-item-title pdt10">亮度</p>
      <div class="col-1 attr-item-edit-input">
        <el-slider
          show-input
          :min="0"
          :max="100"
          input-size="mini"
          :step="1"
        ></el-slider>
        <div class="attr-item-edit-input-des">范围（0-100）</div>
      </div>
    </div>
    <!-- 对比度 -->
    <div class="attr-item-edit-wrapper">
      <p class="attr-item-title pdt10">对比度</p>
      <div class="col-1 attr-item-edit-input">
        <el-slider
          show-input
          :min="0"
          :max="5"
          input-size="mini"
          :step="1"
        ></el-slider>
        <div class="attr-item-edit-input-des">范围（0-5）</div>
      </div>
    </div>
  </div>
</template>

<script>
import WordStyle from "../../word-style";
export default {
  components: {
    WordStyle,
  },
  props: {},
  data() {
    return {
      num: "",
      selectColor: '',
      checkList: [],
      bgOptions: [
        {
          value: "red",
          label: "红色",
          bgColor: "red"
        },
        {
          value: "blue",
          label: "蓝色",
          bgColor: "blue"
        }
      ]
    };
  },
  methods: {
    selectMapStyle(val) {
      this.selectColor = this.bgOptions.find(item => item.value === val).bgColor
    }
  }
};
</script>

<style lang="scss" scoped>
.pdt10 {
  padding-top: 10px;
}
.pdb50 {
  padding-bottom: 50px;
}
.tc {
  text-align: left;
}
.vts {
  vertical-align: super;
}
.line {
  border-top: 2px solid #ccc;
  margin: 10px 0;
}
.config-param {
  .setting-title {
    margin-bottom: 10px;
    .title {
      font-size: 14px;
      font-weight: bold;
    }
  }
  .attr-item-edit-wrapper {
    display: flex;
    width: 100%;
    text-align: center;
    padding-bottom: 10px;
    padding-left: 0;
    .attr-item-title {
      display: inline-block;
      text-align: left;
      min-width: 75px;
      font-size: 12px;
    }
    .attr-item-edit-input {
      &.col-2 {
        width: 90px;
        margin-left: 10px;
      }
      &.col-1 {
        width: 250px;
      }
      &.col-3 {
        width: 60px;
        margin-left: 10px;
      }
      &.col-4 {
        width: 50px;
        margin-left: 10px;
      }
      .selec-mtap-style {
        /deep/.el-input__inner {
          padding: 0 0 0 26px;
        }
      }
      .bgStyle {
        position: absolute;
        z-index: 0;
        top: 4px;
        left: 4px;
      }
      .check-box-style {
        display: flex;
        flex-wrap: wrap;
        .el-checkbox {
          width: 20%;
          text-align: left;
        }
      }
      .attr-item-edit-input-des {
        text-align: left;
        line-height: 1;
        padding-top: 5px;
        margin-top: 2px;
        font-size: 12px;
        color: $gray;
      }
    }
  }
}
</style>
<style lang="scss">
.attr-item-edit-wrapper {
  .el-input-number.is-controls-right .el-input__inner {
    padding-left: 2px;
    padding-right: 32px;
    width: 90px;
  }
  .el-input-number--mini {
    width: 90px;
  }
  .el-slider__runway.show-input {
    margin-right: 108px;
  }
}
</style>